{% extends 'base.html' %}

{% block content %}



<div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">修改资源表</h3>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal" action="" method="post">
                        {% csrf_token %}
                        <div class="form-group {% if error %}has-error{% endif %} ">
                            <label for="inputEmail3" class="col-sm-2 col-sm-offset-1 control-label">名称</label>
                            <div class="col-sm-6">
                                <input type="text" name="Pro_material_name"  class="form-control"  value="{{ Pro_obj.material_name }}" id="inputEmail3">

                                <span class="help-block">{{ error }} </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 col-sm-offset-1 control-label">编号</label>
                            <div class="col-sm-6">
                                <input type="text" name="Pro_material_number"  value="{{ Pro_obj.material_number }}" class="form-control" id="inputPassword3" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 col-sm-offset-1 control-label">购买时间</label>
                            <div class="col-sm-6">
                                <input type="text" name="Pro_buy_time"  value="{{ Pro_obj.buy_time }}" class="form-control" id="inputPassword3" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 col-sm-offset-1 control-label">所属实验室</label>
                            <div class="col-sm-6">
                                <select name=" Pro_Experiment_name" id="">
                                    {% for pro  in Pro_all%}
                                        {% if ret.pro in pro %}
                                            <option value="{{ pro.Experiment.pk }}" selected>{{ pro.Experiment.name }}</option>
                                        {% else %}
                                            <option value="{{ pro.Experiment.pk }}">{{ pro.Experiment.name }}</option>
                                        {% endif %}
                                    {% endfor %}
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-10">
                                <button type="submit" class="btn btn-default">保存</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

{% endblock %}